Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(hier-dep-inj): fix comp name, spelling in field name, copyedits #3335

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Mar 3, 2017

  • Move @Input() to be on setter rather than getter.
  • Fix spelling of field villaines --> villains
  • TaxReturnComponent --> HeroTaxReturnComponent
  • Other misc copyedits

Copy link
Contributor

@wardbell wardbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes.

One question and one tiny update for you and then I'll LGTM.

:marked
By providing `VillainsService` in the `VillainsListComponent` metadata — and nowhere else —,
By providing `VillainsService` in the `VillainsListComponent` metadata — and nowhere else —
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comma was correct but ugly. Please rephrase:

By providing VillainsService in the VillainsListComponent metadata and nowhere else,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

get taxReturn(): HeroTaxReturn {
return this.heroTaxReturnService.taxReturn;
}
@Input()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you move this here? I realize it is technically true that the @Input applies to the setter but does it looks awful and it doesn't change Angular's behavior, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a matter of style, we should encourage readers to associate @Input with setters. This way, documentation and refactoring tools, for example, will attribute the decorator to the proper class member.

Right, Angular's behavior isn't affected (though IMHO it might be incidental behavior that it happens to work when attached to the getter).

If you feel strongly about it, I can undo it. Let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly about it ... yet.

If we really believe that @Input should adorn the setter, we should find a place in the docs to say that and say why. If you have a moment to look for that place and propose language for it, I'd be grateful.

That would be a separate PR. I'm merging this one.

chalin added 2 commits March 5, 2017 13:09
- `villaines` --> `villains`
- `TaxReturnComponent` --> `HeroTaxReturnComponent`
- Moved `@Input()` to be on setter rather than getter.
- Other misc copyedits
@chalin chalin force-pushed the chalin-hier-dep-inj-copyedits-0302 branch from ee4e065 to a5f846e Compare March 5, 2017 21:09
@wardbell wardbell merged commit ffdf5ca into angular:master Mar 7, 2017
@wardbell wardbell deleted the chalin-hier-dep-inj-copyedits-0302 branch March 7, 2017 18:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants